<%-- 
    Document   : courseDescription
    Created on : Jan 7, 2013, 2:56:41 PM
    Author     : Aster
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <link href="style/tutor.css" type="text/css" rel="Stylesheet">
        <!-- include jQuery Library From Google Code -->
        <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js" type="text/javascript"></script>

        <script type="text/javascript">
            $(document).ready(function(){
                $("#floatingMenu").click(function () {
                    $('#floatingMenuContent').slideToggle();
                });
             
                $("#editDescription").click(function(){
                    $('textarea[name=content]').removeProp('disabled');
                    $('input[type=submit]').removeProp('disabled');

                });
                
                $("#editLongDescription").click(function(){
                    $('textarea[name=content2]').removeProp('disabled');
                    $('input[type=submit]').removeProp('disabled');

                });     
                
            });
        </script>

        <jsp:useBean id="inhoud" scope="application" class="models.Bean" />   
        <jsp:setProperty name="inhoud" property="language" value="<%= models.Bean.getLanguage()%>" />
        
        <title>
            Three 2 Learn
        </title>
    </head>
    <body>       
        <div id="wrapper">
            <jsp:include page="sidebar.jsp"/>
            <div id="right">
                <jsp:include page="courseDescriptionList.jsp"/>          

                <h1>
                    <jsp:setProperty name="inhoud" property="key" value="CourseDescription" />
                    <jsp:getProperty name="inhoud" property="key" />
                </h1>
                <c:if test="${not empty descriptionCourse}">
                    <form action="/description" method="post">
                        <table width="100%">
                            <th colspan="2">
                                <jsp:setProperty name="inhoud" property="key" value="DescriptionOfTheCourse" />
                                <jsp:getProperty name="inhoud" property="key" />
                            </th>
                            <tr>
                                <td class="darker" style="width:200px">
                                    <b><jsp:setProperty name="inhoud" property="key" value="Name" />
                                    <jsp:getProperty name="inhoud" property="key" /></b>
                                    :
                                </td>
                                <td>${descriptionCourse.name}</td>
                            </tr>
                            <tr>
                                <td class="darker">
                                    <b><jsp:setProperty name="inhoud" property="key" value="ShortDescription" />
                                    <jsp:getProperty name="inhoud" property="key" /></b>
                                    :
                                </td>
                                <td>
                                    <a class="button"href="#" id="editDescription"> 
                                    <jsp:setProperty name="inhoud" property="key" value="Edit" />
                                    <jsp:getProperty name="inhoud" property="key" />
                                    </a>
                                </td>
                            </tr>
                            <tr><td colspan="2"><textarea name="content"required="required" disabled>${descriptionCourse.description}</textarea></td></tr>
                            <tr><td class="darker">
                                    <b><jsp:setProperty name="inhoud" property="key" value="LongDescription" />
                                    <jsp:getProperty name="inhoud" property="key" /></b>
                                    :</td><td><a class="button"href="#" id="editLongDescription"> 
                                    <jsp:setProperty name="inhoud" property="key" value="Edit" />
                                    <jsp:getProperty name="inhoud" property="key" />
                                    </a></td></tr>
                            <tr><td colspan="2"><textarea name="content2"required="required" disabled>${descriptionCourse.longDescription}</textarea></td></tr>                            
                            <input type="hidden" name="id" value="${descriptionCourse.courseID}"/>
                            <tr><td colspan="2"class="darker"><input type="submit" disabled name="submit" value="submit"/></td></tr>
                        </table>
                    </form>
                </c:if>

            </div>
        </div>
    </body>
</html>